<div class="forum">
<div id="bloc_forum_category">
  <h2>Categorie : <?php echo '<span class="cat-forum">'.$forum_category->getName().'</span>' ?> >> <?php echo '<span class="subjet-forum">'.$forum_topic->getSubject().'</span>' ?></h2>
</div>
<div id="bloc_topic_descr">
  <?php echo $forum_topic->getDescr() ?>
</div>
<div id="bloc_forum_user">
	<div class="infos_editeur">
			<span class="auteur"><?php echo __('Prosted By') ?></span>
			<span class="auteur-name"><?php echo $forum_members->sfGuardUser->getUsername(); ?></span>
			<span class="update-libelle"><?php echo __('Create at') ?></span>
			<span class="update_as"><?php echo $forum_topic->getDateTimeObject('created_at')->format('d/m/Y') ?></span>
	</div>
</div>
<table width="100%">
  <tbody>
    <?php foreach($forum_posts as $forum_post): ?>
	<tr>
	  <td class="user_post">
	     <?php echo $forum_post->sfGuardUser->getUsername(); ?>
		 <br/>
		 <img alt="" src="/uploads/user/<?php echo $forum_post->sfGuardUser->getUserImage()  ?>" />		  
	  </td>
	  <td>
	     <?php echo $forum_post->getMessage(); ?>
		 <div align="right"><?php echo $forum_post->getDateTimeObject('created_at')->format('d/m/Y'); ?> </div>
	  </td>
	</tr>
	<?php  endforeach; ?>
  </tbody>
</table>

<div class="zone_post_msg">
<?php if($isallows ==4) : ?>
<form action="<?php echo url_for("post_create") ?>" method="post" />
<input name="topicId" type="hidden" value="<?php echo $forum_topic->getId() ?>" />
  <textarea name="messsage" rows="10" cols="70" >
    saisir le texte
  </textarea>
   <p><span class="left_btn"><span class="right_btn"><span class="rpt_btn"><input class="btn_valider" type="submit" value="Post" /></span></span></span></p>
</form>
<?php endif; ?>
</div>
</div>
<hr />
<div>

<?php if($sf_user->isAuthenticated() && $sf_user->getGuardUser()->getId() == $forum_members->sfGuardUser->getId() ) : ?>
<a class="link-edit" href="<?php echo url_for('forumTopic/edit?id='.$forum_topic->getId()) ?>">Edit</a>
<?php endif ;?>
<?php ?>
&nbsp;
<a class="link-list" href="<?php echo url_for('forumTopic/index') ?>">List</a>
<?php if($isallows == 3) { ?>
&nbsp;
<p class="infos"> votre demande de participation aux forum est en cours de validation  </p>

<?php } elseif($isallows == 2) { ?>
&nbsp;
<a class="link-list" href="<?php echo url_for('@sf_forum_ask_authorisation?topicId='.$forum_topic->getId()); ?>">Pour participer</a>
<?php } elseif($isallows == 1) { ?>
&nbsp;
<a class="link-list" href="<?php echo url_for('@sf_guard_register_topic?topicId='.$forum_topic->getId()); ?>">S'enregistrer</a>
<?php } ?>
</div>
